<template>
  <lay-container class="page-box pa-12">
    <iframe :src="state.link" frameborder='0' scrolling='auto' width='100%' height='100%'></iframe>
  </lay-container>
</template>

<script setup lang="ts">
import {useRoute} from 'vue-router';

// 定义变量内容
const route = useRoute();
const state = reactive({
  title: '',
  link: '',
});

// 监听路由的变化，设置内容
watch(
    () => route.path,
    () => {
      state.title = <string>route.query.title;
      state.link = <string>route.query.link;
    },
    {
      immediate: true,
    }
);
</script>

<style scoped lang="less">
</style>
